home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 April / CICA MS Windows - April 1993.iso / unzipped / util / gswingui / gswingui.txt next >
Text File  |  1993-03-16  |  8KB  |  223 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.     Command Line Graphical User Interface
  7.                    for
  8.         Ghostscript for Windows
  9.  
  10.             Version 1.0
  11.              March 1993
  12.  
  13.  
  14.  
  15.  
  16.  
  17. Abstract:
  18. ---------
  19.  
  20. The accompanying software is a MS Windows program.  It makes the use of
  21. Ghostscript for Windows more convenient.
  22.  
  23.  
  24.  
  25.  
  26. About Postscript & Ghostscript:
  27. -------------------------------
  28.  
  29. Ghostscript for Windows is a MS Windows version of Ghostscript, a Postscript
  30. interpreter, from Aladdin Enterprises, Copyright 1989, 1992.  It is
  31. distributed by the Free Software Foundation, Inc.  Ghostscript can be
  32. downloaded from various sites on the Internet, and some BBS's.
  33.  
  34. Ghostscript was originally used on UNIX systems, but has been ported to the
  35. PC.  There are PC, 386 PC, and MS Windows versions available.
  36.  
  37. Postscript is a "Page Description Language" used in Desktop Publishing by
  38. high-end systems, and printed on Postscript Printers, the high end of
  39. laser printers.  It is also used by commercial printers.
  40.  
  41. Ghostscript allows the Postscript output of various programs to be viewed
  42. on computer screens, converted to image files, and printed on inexpensive
  43. printers.  As freely distributable software, is an incredible piece of work.
  44.  
  45. To use this Command Line GUI software you will need:
  46.  
  47.      A 386 or better PC with enough memory
  48.      MS Windows 3.1 running Enhanced Mode
  49.      Ghostscript 2.5.2 for Windows  gs252win.zip
  50.      Ghostscript ini files          gs252ini.zip
  51.      Ghostscript font files         24*.zip & 25*.zip
  52.  
  53.      This software                  gswingui.zip
  54.      The Visual Basic DLL file      vbrun100.dll
  55.  
  56.  
  57.  
  58.  
  59.  
  60. The Command Line GUI for MS Windows:
  61. ------------------------------------
  62.  
  63. The present piece of software was created to make the use of Ghostscript for
  64. Windows convenient.  The Windows version of Ghostscript (GS) is similar
  65. to the DOS and UNIX versions.  It will output graphics to a separate window
  66. in the MS Windows version, and take advantage of a 256 colour display
  67. if you have one.
  68.  
  69. Unless you know Postscript programming, you may find using Ghostscript
  70. awkward, especially since the GS documentation is very brief.  GS can
  71. be used conveniently if it is launched with command line parameters.
  72. However, using command line parameters is a bit difficult under MS Windows
  73. so I wrote a program in Visual Basic to make it easier.
  74.  
  75. The program has file browsing tools to let you move through subdirectories
  76. looking for your Postscript files.  You can click on one file to enter it
  77. into the command line, which you can see on the yellow horizontal bar.
  78.  
  79. You can click command buttons or manually enter for the file search pattern,
  80. in order to look for *.ps, *.eps, *.grp, or other files.
  81.  
  82. I have also included a command button to bring up the notepad program of
  83. MS Windows in order to manually edit your selected Postscript file, if it
  84. is not too long for notepad.  Use this feature carefully.
  85.  
  86. There are command buttons for some of the alternative resolutions (available
  87. resolutions are printer dependent).  Other resolutions can be manually entered
  88. into the command line.
  89.  
  90. The are list boxes for selecting output devices and output destinations
  91. (screen, printer, or file).  Some of the device/destination combinations are
  92. incompatible and are not selectable.
  93.  
  94. There is an  [Upper PS to 640x480 Image]  button to create an image of the
  95. upper part of a PS page inside a 640x480 screen image or gif file. The
  96. image is enlarged (margins are clipped) so the command will not be satisfactory
  97. for all Postscript files.  I created this option in order to get output from
  98. certain commercial software into a gif file.  You will have to edit the
  99. uppr_gif.ps and uppr_scr.ps files in order to change the magnification and
  100. position on the page.  Use trial and error, or expertise.
  101.  
  102. There is a [-q -dNOPAUSE] button for "production runs" and a [ Make Portrait ]
  103. button to shift a landscape picture into a reduced size portrait orientation.
  104. (The port_*.ps routines need improvement by someone who knows Postscript
  105. programming.)
  106.  
  107. The [ Execute... ] button launches Ghostscript for Windows with the command
  108. line parameters displayed in the text box.  If the line is too long for DOS,
  109. it will have to be shortened.  One way is to output to a file in the C:\
  110. directory or in the default directory.  Another is to use the @filename
  111. facility described in the Ghostscript documentation.
  112.  
  113. Note that GS can convert Postscript files into *.gif files of stated resolution
  114. or image dimensions.
  115.  
  116. The [ RESET ] button returns to the starting condition of the interface
  117. program.
  118.  
  119.  
  120.  
  121.  
  122.  
  123. Installation:
  124. -------------
  125.  
  126. You will need the Visual Basic DLL file vbrun100.dll in your Windows
  127. directory in order to use the interface.  This file is freely distributable
  128. and can be found on the Internet and many BBS's.
  129.  
  130. Unzip this interface software into a subdirectory... I suggest C:\GSCRIPT.
  131.  
  132. Unzip Ghostscript for Windows and its support files into this same
  133. directory (e.g. C:\GSCRIPT).
  134.  
  135. Set up the following environment variable in your AUTOEXEC.BAT file.  Enter
  136. this line into AUTOEXEC.BAT:
  137.  
  138. SET GS_LIB=C:\GSCRIPT
  139.  
  140. or substitute whatever subdirectory you have chosen.  (If you don't know what
  141. I am talking about, get help!)
  142.  
  143. Bring up MS Windows.  Under the Program Manager menu system, select File,New
  144. and install a new program item into your Applications program group.  The
  145. program is:
  146.  
  147.      c:\gscript\vb_gs.exe
  148.  
  149. and also set the working directory to  C:\GSCRIPT  (assuming this is the
  150. subdirectory you have chosen.
  151.  
  152. You may wish to use your own icon.
  153.  
  154. Run the program in the usual way.  Hit the [Execute Ghostscript Command Line]
  155. button to launch Ghostscript with whatever parameters you have chosen.
  156.  
  157. You can also use Ghostscript interactively if you know how.  There are a few
  158. suggestions in the GS documentation - read it (use.doc and others).
  159.  
  160. To quit, type  quit  into the Ghostscript interactive session.
  161.  
  162.  
  163.  
  164.  
  165.  
  166. Hints:
  167. ------
  168.  
  169. When GS for Windows generates a screen image, it is in a Form called
  170. Ghostscript Image.  You can click this icon to full size to see the
  171. image being generated.
  172.  
  173. The Ghostscript Image will display when done, anyway.  It can be sent to
  174. the Windows Clipboard once displayed.
  175.  
  176. The image size can be user set with the -r parameter (pixels per inch) or
  177. by setting the image size with -g (see the GS documentation).
  178.  
  179.  
  180.  
  181.  
  182.  
  183. *.PS Files:
  184. -----------
  185.  
  186. There are six accompanying PS files here.
  187.  
  188. The port_*.ps files when used with the -g640x480 parameter should turn a
  189. landscape picture upright and fit it in a 640x480 image.  For printers the
  190. portrait mode was set up to work with 300 DPI printers. Other aspect ratios may
  191. not work.  There is probably a better way to do this.  The proportions are
  192. about right, but not exactly right.
  193.  
  194. The uppr_scr.ps and uppr_gif.ps files when used with the -g640x480 parameter
  195. give a slightly enlarged view of the upper part of a Postscript page.  They
  196. were written for output to screen or gif file.
  197.  
  198. The seefonts.ps program is based on the one in the GS distribution
  199. and will show some selected fonts.
  200.  
  201.  
  202.  
  203.  
  204.  
  205. Final Notes:
  206. ------------
  207.  
  208. This program was written with Visual Basic for Windows ver. 1.0.  You will
  209. need the vbrun100.dll file in your Windows directory in order to run it.  This
  210. file can be found on Internet sites or on many BBS's.
  211.  
  212. This program is freely distributable.  It is not to be sold.
  213.  
  214. Use at your own risk.  I accept no responsibilities for its use,
  215. inability to use, damages, or consequential damages, etc., etc., etc.
  216.  
  217.  
  218.  
  219.  
  220. Peter Budgell, March 1993.               peter@engrg.uwo.ca
  221.  
  222.  
  223.